import os

# for root, dirs, files in os.walk("/home/meng/Lab/py_class_1/"):
#     for d in dirs:
#         print(d)
#         print(os.path.join(root, d))

#     for f in files:
#         print(f)
#         print(os.path.join(root, f))

# root_dir = "/home/meng/Lab/py_class_1/"
root_dir = "D:\\Lab\\py_class_1"

lst = os.listdir(root_dir)
print(lst)
for item in lst:
    ss = os.path.join(root_dir, item)
    if os.path.isfile(ss):
        print("file:", ss)

    if os.path.isdir(ss):
        ss = os.path.join(root_dir, item)
        l = os.listdir(ss)
        print("dir:", l)
print("finish")
